package minh.bac.wcbrazil2014;


import android.support.v7.app.ActionBarActivity;
import android.content.Intent;
import android.os.Bundle;

public class MainActivity extends ActionBarActivity{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getSupportActionBar().hide();
		setContentView(R.layout.activity_main);
		// create splash screen that will sleep for 3 s
		Thread threadSplashScreen = new Thread()
		{
				public void run()
				{
					try
					{
						// sleep for 4 s
						sleep(2*1000);
								
						//start my homescreen after 4 s
								
						Intent intent = new Intent(MainActivity.this, HomeScreen.class);
						intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
						startActivity(intent);
								
								//finish this activity
								
						finish();
						}catch(Exception e)
						{
								//Log.d(TAGandTYPE.SPLASH_SCREEN, e.toString());
						}
						}
		};
		// start splash
		threadSplashScreen.start();

	}
	
	

}
